﻿#if NLog
using LM = global::NLog.LogManager;

namespace Cat.Core.XLog.NLog
{
    public sealed class NLogProvider : LogProviderBase, ILogProvider
    {
        public static ILogProvider Instance { get; } = new NLogProvider();
        private NLogProvider() { }

        protected override ILogger GetLoggerCore(string name)
        {
            var logger = LM.GetLogger(name);
            var result = new NLogger(logger);
            return result;
        }
    }
}
#endif
